<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="<?=$base_view; ?>/js/formvalidator_jquery.js" type="text/javascript"></script>
<script src="<?=$base_view; ?>/js/formvalidator.js" charset="UTF-8" type="text/javascript"></script>
<script src="<?=$base_view; ?>/js/inc.js" type="text/javascript"></script>
<title>填写信息_注册_<?=$site_name?></title>
<style type="text/css">
<?php $this->load->view('css/inc_reg_css'); ?>
.onShow,
.onFocus,
.onError,
.onCorrect,
.onLoad {
    padding-left:25px; 
	font-size: 12px;
	line-height:22px; 
	vertical-align:middle;
	margin-left:10px;
	width:230px;
}


.onFocus{  	
	border:1px solid #ADD0E4;  
	background:#E9F0FF url(<?=$base_img?>/images/jiaju369/onFocus.gif) no-repeat; 
}
.onError{ 	border:1px solid #ADD0E4;
	background:#E9F0FF url(<?=$base_img?>/images/jiaju369/onError.gif) no-repeat;
}
.onCorrect{ 
	background: url(<?=$base_img?>/images/jiaju369/onCorrect.gif) no-repeat;
}
.onLoad{    
	background:#E9FFEB url(<?=$base_img?>/images/jiaju369/onLoad.gif) no-repeat 3px 3px;
} 

/* 表格css */
.t_reg,
.t_reg td {
		border-collapse:collapse;
}
.t_reg tr {
	height:38px;
	line-height:38px;
}	

.t_reg .regleft {
	text-align:right;
	padding-right:20px;
	font-weight:bold;
	font-size:14px;
}


/* 表单的宽度 */
.inp {
	width:280px;
}

/* 选择语言 */
.lang {
	width:800px;
	margin:auto;
	margin-top:15px;
	text-align:right;
	padding-right:2px;
}

.bio {
	width:68px;
}

#chengshi {
	display:none;
}



</style>
<script language="JavaScript" type="text/javascript">
// 刷新验证码
function refresh(strid)
{
	var url='<?php echo $base_header."/imgauthcode/show/";?>' + Math.random();
	$('#'+strid).attr('src', url);
}


$(document).ready(function(){


	// 表单验证
	$.formValidator.initConfig({
	formid:"form_reg",
	onerror:function(msg){
		//alert(msg)
		},
	onsuccess:function(){
	$("#you").html($("#email").val());
	boxon('notemail');
	return false;}
	});

	$("#uname").formValidator({
		onshow:" ",   // 必须留个空格。 否则其它状态提示失效
		onfocus:"请输入您的姓名",
		oncorrect:"　"
	}).inputValidator({min:1,onerror:"姓名不能为空"});

	$("#mobile").formValidator({
		onshow:" ",   // 必须留个空格。 否则其它状态提示失效
		onfocus:"请输入您的手机号码",
		oncorrect:"　"
	}).inputValidator({min:1,onerror:"手机号码不能为空"});
	

	$("#idcard").formValidator({
		onshow:" ",   // 必须留个空格。 否则其它状态提示失效
		onfocus:"请输入您的身份证号码",
		oncorrect:"　"
	}).inputValidator({min:1,onerror:"身份证号码不能为空"});
	
	
	$("#email").formValidator({
		onshow:" ",
		onfocus:"请输入您的邮箱",
		oncorrect:"　"
	}).inputValidator({
		min:1,
		onerror:'邮箱不能为空'
	}).regexValidator({
		regexp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",onerror:"您输入的邮箱格式不正确"
	});


	$("#upwd1").formValidator({
		onshow:" ",
		onfocus:"可输入数字、字母（区分大小写）",
		oncorrect:"　"
	}).inputValidator({
		min:3,
		max:15,
		empty:{
			leftempty:false,
			rightempty:false,
			emptyerror:"密码两边不能有空格"
		},
		onerror:'请设定3-15位的密码'
	}).regexValidator({
	regexp:"^[A-Za-z0-9]+$",
	onerror:"不能输入特殊字符"
	});

	$("#upwd2").formValidator({
		onshow:" ",
		onfocus:"可输入数字、字母（区分大小写）",
		oncorrect:"　"
	}).inputValidator({
		min:3,
		max:15,
		empty:{
			leftempty:false,
			rightempty:false,
			emptyerror:"密码两边不能有空格"
		},
		onerror:'请设定3-15位的密码'
	}).regexValidator({
		regexp:"^[A-Za-z0-9]+$",
		onerror:"不能输入特殊字符"
	}).compareValidator({
		desid:"upwd1",
		operateor:"=",
		onerror:"两次密码不一致,请重新输入"
	});


	$("#chkcode").formValidator({
			onshow:" ",
			onfocus:"请输入下面图形验证码",
			oncorrect:"　"
		}).inputValidator({
			min:1,
			onerror:'验证码不能为空'
		});
	// 更新验证码
	$('#chkcode').focus(function(){
			refresh('chkimg');
	});
	
});

// 验证表单
function chkform()
{
	boxon('notemail');
	return false;
}





</script>
</head>
<body>
<!-- container -->
<div class="container">

	<?php $this->load->view('reg/inctop_view');?>		
	<div class="step1"></div>
	<form id="form_reg" name="form_reg" action="<?php echo $base_header ?>/reg/reg2" method="post" >			
<?=$exeid?>
	<div style="padding-top:15px; color:black; width:688px; margin:auto;font-family:Arial, Helvetica, sans-serif; font-size:22px; font-weight:bold;">创建帐户</div>
	<div>
	<table class="t_reg" width="733" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
					<td colspan="3"><span style="color:#3366CC; font-family:Arial, Helvetica, sans-serif; font-size:20px; font-weight:bold;">开始使用家具369 </span></td>
					</tr>

	<tr>
		<td width="122" class="regleft">姓 名:</td>
		<td width="289" class="regright"><input class="inp" type="text" id="uname" name="uname" /></td>
		<td width="322"><div id="unameTip"></div></td>
	</tr>
	<tr>
		<td class="regleft">性 别:</td>
		<td class="regright">
<input type="radio" checked="checked" id="gender_boy" name="gender" value="1" />
		<label for="gender_boy">男</label>&nbsp;
<input type="radio" id="gender_girl" name="gender" value="0"  />
		<label for="gender_girl">女</label>&nbsp;&nbsp;&nbsp;
		</td>
		<td><div id="genderTip"></div></td>
	</tr>
	
	
	<tr>
		<td class="regleft">手 机:</td>
		<td class="regright"><input class="inp" type="text" name="mobile" id="mobile" /></td>
		<td><div id="mobileTip"></div></td>
	</tr>

	<tr>
		<td class="regleft">邮 箱:</td>
		<td class="regright"><input class="inp" type="text" name="email" id="email" /></td>
		<td><div id="emailTip"></div></td>
	</tr>		
	<tr>
		<td class="regleft">身份证:</td>
		<td class="regright"><input class="inp" type="text" name="idcard" id="idcard" /></td>
		<td><div id="idcardTip"></div></td>
	</tr>
	
<tr>
					<td class="regleft">设定密码:</td>
					<td class="regright">
									<input value="" id="upwd1" class="inp" type="password" name="upwd" />								</td>
					<td><div id="upwd1Tip"></div></td>
	</tr>
	<tr>
		<td class="regleft">请再次输入密码:</td>
		<td class="regright"><input value="" id="upwd2" class="inp" type="password"  /></td>
		<td><div id="upwd2Tip"></div></td>
	</tr>
	<tr>
		<td class="regleft">所在地:<input style="float:left;border:0; padding:0; margin:0;width:0px; height:0px;" id="addressid" type="text" name="addressid" value="0" /></td>
		<td class="regright">
		<!-- addressid -->

<script type="text/javascript" src="<?=$base_url; ?>/cache/js/reg_area.js"></script>
<script type="text/javascript" src="<?=$base_view; ?>/js/liandong.js"></script>
<div id="TempSelect1"></div>
<script type="text/javascript">
	// 来源数据处理
	var j=0,i='';
	AddressTree["a_record"]=new Array();	//存储记录的记录号
	for(i in AddressTree["a_row"])
	{
		AddressTree["a_record"][j++]=i;
	}
	AddressTree.ObjNumber= 1 ;
	// 来源数据处理 End
	obj1=document.getElementById("TempSelect1");
	var areaObj=new LightManAddressTree(AddressTree,"addressid");
	areaObj.selectshow(obj1,1); // 1 表示从父id为1开始
</script>
<!-- /联动-->
		<!-- /addressid -->
		</td>
		<td><div id="addressidTip"></div></td>
	</tr>
	<tr>
		<td class="regleft">验证码:</td>
		<td class="regright"><input id="chkcode" class="inp" maxlength="4" type="text" name="chkcode" /></td>
		<td><div id="chkcodeTip"></div></td>
	</tr>
	<tr>
					<td class="regleft">验证码图片:</td>
					<td colspan="2" class="regright"><img id="chkimg" src="<?php echo $base_header.'/imgauthcode/show';?>" title="单击更换" alt="单击更换" onclick="refresh('chkimg')"  style="margin-top:5px; cursor:pointer;" />&nbsp;<a href="javascript:refresh('chkimg');" >点击更换</a></td>
	</tr>
	<tr>
					<td class="regleft">&nbsp;</td>
					<td colspan="2" class="regright"><label>
<input style="width:200px; height:30px; border:1px solid #7F9DB9; " type="submit"  name="Submit" value="确定&nbsp;并同意以下条款" />
					</label></td>
	</tr>
	<tr>
					<td class="regleft">&nbsp;</td>
					<td colspan="2" class="regright"></td>
	</tr>
	<tr>
					<td class="regleft">&nbsp;</td>
					<td colspan="2" class="regright"><a href="" target="_blank" >家具369 用户服务条款</a></td>
	</tr>
</table>
	</div>
	</form>

	
<?php $this->load->view('reg/incfooter_view');?>	

<?php 
// 确认邮箱
$smail=<<<EOT
	<div class="suremail">
<p>	您的电子邮箱 ：<span class="you" id="you"></span></p> 

	<input id="divsubmit" name="yc" type="button" onclick="dis2sub('divsubmit','document.form_reg.submit()')" value="确定" class="btn"/>&nbsp;&nbsp;&nbsp;<input name="" type="button" onclick="boxoff('notemail');"  value="返回修改"  class="btn"/>
	</div>
EOT;


$newboxtitle = '确认电子邮箱地址!';
box_newbox('notemail',$newboxtitle,$smail,'150px');

?>
</div>

</body>
</html>
